package com.ruoyi.order.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 订单主：记录订单核心业务信息对象 tb_order
 * 
 * @author ruoyi
 * @date 2025-08-17
 */
public class TbOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单唯一标识ID，自增序列 */
    private Integer orderId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 订单所属城市 */
    @Excel(name = "订单所属城市")
    private String city;

    /** 服务类型（如预约订单、实时订单） */
    @Excel(name = "服务类型", readConverterExp = "如=预约订单、实时订单")
    private Long serviceType;

    /** 车辆级别（如舒适型、豪华型） */
    @Excel(name = "车辆级别", readConverterExp = "如=舒适型、豪华型")
    private Long vehicleType;

    /** 订单状态（如已完成、服务中） */
    @Excel(name = "订单状态", readConverterExp = "如=已完成、服务中")
    private Long orderStatus;

    /** 乘客上车地点 */
    @Excel(name = "乘客上车地点")
    private String startAddress;

    /** 乘客下车地点 */
    @Excel(name = "乘客下车地点")
    private String endAddress;

    /** 订单原始金额 */
    @Excel(name = "订单原始金额")
    private BigDecimal orderAmount;

    /** 服务时长（分钟） */
    @Excel(name = "服务时长", readConverterExp = "分=钟")
    private Long serviceDuration;

    /** 服务里程（公里） */
    @Excel(name = "服务里程", readConverterExp = "公=里")
    private BigDecimal serviceMileage;

    /** 下单来源（如个人、企业） */
    @Excel(name = "下单来源", readConverterExp = "如=个人、企业")
    private Long orderSource;

    /** 支付类型（如微信、支付宝） */
    @Excel(name = "支付类型", readConverterExp = "如=微信、支付宝")
    private Long paymentType;

    /** 乘客用户ID，关联用户表 */
    @Excel(name = "乘客用户ID，关联用户表")
    private Long userId;

    /** 乘车人姓名 */
    @Excel(name = "乘车人姓名")
    private String passengerName;

    /** 乘车人手机号 */
    @Excel(name = "乘车人手机号")
    private String passengerMobile;

    /** 司机ID，关联司机表 */
    @Excel(name = "司机ID，关联司机表")
    private Long driverId;

    /** 司机姓名 */
    @Excel(name = "司机姓名")
    private String driverName;

    /** 司机手机号 */
    @Excel(name = "司机手机号")
    private String driverMobile;

    /** 车辆车牌号 */
    @Excel(name = "车辆车牌号")
    private String licensePlate;

    /** 预约用车时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预约用车时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useCarTime;

    /** 司机出发时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "司机出发时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date driverDepartureTime;

    /** 司机到达上车点时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "司机到达上车点时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date driverArrivalTime;

    /** 服务开始时间（乘客上车） */
    @Excel(name = "服务开始时间", readConverterExp = "乘=客上车")
    private Date serviceStartTime;

    /** 服务结束时间（乘客下车） */
    @Excel(name = "服务结束时间", readConverterExp = "乘=客下车")
    private Date serviceEndTime;

    /** 支付完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;

    /** 订单取消时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单取消时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date cancelTime;

    public void setOrderId(Integer orderId) 
    {
        this.orderId = orderId;
    }

    public Integer getOrderId() 
    {
        return orderId;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setCity(String city) 
    {
        this.city = city;
    }

    public String getCity() 
    {
        return city;
    }

    public void setServiceType(Long serviceType) 
    {
        this.serviceType = serviceType;
    }

    public Long getServiceType() 
    {
        return serviceType;
    }

    public void setVehicleType(Long vehicleType) 
    {
        this.vehicleType = vehicleType;
    }

    public Long getVehicleType() 
    {
        return vehicleType;
    }

    public void setOrderStatus(Long orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public Long getOrderStatus() 
    {
        return orderStatus;
    }

    public void setStartAddress(String startAddress) 
    {
        this.startAddress = startAddress;
    }

    public String getStartAddress() 
    {
        return startAddress;
    }

    public void setEndAddress(String endAddress) 
    {
        this.endAddress = endAddress;
    }

    public String getEndAddress() 
    {
        return endAddress;
    }

    public void setOrderAmount(BigDecimal orderAmount) 
    {
        this.orderAmount = orderAmount;
    }

    public BigDecimal getOrderAmount() 
    {
        return orderAmount;
    }

    public void setServiceDuration(Long serviceDuration) 
    {
        this.serviceDuration = serviceDuration;
    }

    public Long getServiceDuration() 
    {
        return serviceDuration;
    }

    public void setServiceMileage(BigDecimal serviceMileage) 
    {
        this.serviceMileage = serviceMileage;
    }

    public BigDecimal getServiceMileage() 
    {
        return serviceMileage;
    }

    public void setOrderSource(Long orderSource) 
    {
        this.orderSource = orderSource;
    }

    public Long getOrderSource() 
    {
        return orderSource;
    }

    public void setPaymentType(Long paymentType) 
    {
        this.paymentType = paymentType;
    }

    public Long getPaymentType() 
    {
        return paymentType;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setPassengerName(String passengerName) 
    {
        this.passengerName = passengerName;
    }

    public String getPassengerName() 
    {
        return passengerName;
    }

    public void setPassengerMobile(String passengerMobile) 
    {
        this.passengerMobile = passengerMobile;
    }

    public String getPassengerMobile() 
    {
        return passengerMobile;
    }

    public void setDriverId(Long driverId) 
    {
        this.driverId = driverId;
    }

    public Long getDriverId() 
    {
        return driverId;
    }

    public void setDriverName(String driverName) 
    {
        this.driverName = driverName;
    }

    public String getDriverName() 
    {
        return driverName;
    }

    public void setDriverMobile(String driverMobile) 
    {
        this.driverMobile = driverMobile;
    }

    public String getDriverMobile() 
    {
        return driverMobile;
    }

    public void setLicensePlate(String licensePlate) 
    {
        this.licensePlate = licensePlate;
    }

    public String getLicensePlate() 
    {
        return licensePlate;
    }

    public void setUseCarTime(Date useCarTime) 
    {
        this.useCarTime = useCarTime;
    }

    public Date getUseCarTime() 
    {
        return useCarTime;
    }

    public void setDriverDepartureTime(Date driverDepartureTime) 
    {
        this.driverDepartureTime = driverDepartureTime;
    }

    public Date getDriverDepartureTime() 
    {
        return driverDepartureTime;
    }

    public void setDriverArrivalTime(Date driverArrivalTime) 
    {
        this.driverArrivalTime = driverArrivalTime;
    }

    public Date getDriverArrivalTime() 
    {
        return driverArrivalTime;
    }

    public void setServiceStartTime(Date serviceStartTime) 
    {
        this.serviceStartTime = serviceStartTime;
    }

    public Date getServiceStartTime() 
    {
        return serviceStartTime;
    }

    public void setServiceEndTime(Date serviceEndTime) 
    {
        this.serviceEndTime = serviceEndTime;
    }

    public Date getServiceEndTime() 
    {
        return serviceEndTime;
    }

    public void setPaymentTime(Date paymentTime) 
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime() 
    {
        return paymentTime;
    }

    public void setCancelTime(Date cancelTime) 
    {
        this.cancelTime = cancelTime;
    }

    public Date getCancelTime() 
    {
        return cancelTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderNo", getOrderNo())
            .append("city", getCity())
            .append("serviceType", getServiceType())
            .append("vehicleType", getVehicleType())
            .append("orderStatus", getOrderStatus())
            .append("startAddress", getStartAddress())
            .append("endAddress", getEndAddress())
            .append("orderAmount", getOrderAmount())
            .append("serviceDuration", getServiceDuration())
            .append("serviceMileage", getServiceMileage())
            .append("orderSource", getOrderSource())
            .append("paymentType", getPaymentType())
            .append("userId", getUserId())
            .append("passengerName", getPassengerName())
            .append("passengerMobile", getPassengerMobile())
            .append("driverId", getDriverId())
            .append("driverName", getDriverName())
            .append("driverMobile", getDriverMobile())
            .append("licensePlate", getLicensePlate())
            .append("createTime", getCreateTime())
            .append("useCarTime", getUseCarTime())
            .append("driverDepartureTime", getDriverDepartureTime())
            .append("driverArrivalTime", getDriverArrivalTime())
            .append("serviceStartTime", getServiceStartTime())
            .append("serviceEndTime", getServiceEndTime())
            .append("paymentTime", getPaymentTime())
            .append("cancelTime", getCancelTime())
            .append("remark", getRemark())
            .toString();
    }
}
